#ifndef __UICONTROLWND_H_
#define __UICONTROLWND_H_

class CControlWndUI;
class CControlWnd;

class DUI_API CControlWndUI : public CControlUI
{
	friend class CControlWnd;
public:
	CControlWndUI(void);
	virtual ~CControlWndUI(void);
	static CControlUI* CreateObject();

	virtual void SetAttribute(LPCTSTR lpszName, LPCTSTR lpszValue);
	virtual void SetVisible(bool bShow, bool bRedraw = true);
	virtual void SetInternVisible(bool bShow);
	bool ShowWnd(bool bShow);
	bool ShowBk(bool bShow);
	HWND GetHWND();
protected:
	virtual void OnSize(const RECT& rectRegion);
	virtual void Render(HDC& hDestDC, RECT& rcPaint);
	void InitControl();
	bool DoCreateControl();
	void ReleaseControl();
	bool IsTop(){return m_bTop;}
private:
	bool m_bCreated;
	bool m_bShowWND;
	bool m_bShowBk;
	bool m_bTop;
	CControlWnd* m_pWindow;
};

#endif